<template>
  <view class="box">
    <view class="top">
		<view v-if="info.agreement" class="flex_r_between" @click="dolawd(info.agreement)" style="font-size: 22rpx;margin: 10rpx 0 0;color: #007AFF;text-decoration: underline;justify-content: flex-end;">
			下载协议
		</view>
		</view>
    <view class="main">
      <image :src="info.logo" mode=""></image>
      <text>{{info.name}}</text>
      <text>{{info.info}}</text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      tabValue: ['公司介绍', '协议内容'],
      index: 0,
	  info:{}
    };
  },
  onLoad() {
  	this.$ajax('api/Member/About').then(res => {
		this.info = res.Data
	})
  },
  methods: {
    getIndex(index) {
      console.log(index);
      this.index = index;
    },
	dolawd(url){
		uni.downloadFile({
			url:url,
			success() {
				uni.showToast({
					title: '下载成功'
				});
			},
			fail(er){
				console.log(er)
			}
		})
	}
  }
};
</script>

<style lang="scss">
.box {
  width: 100vw;
  height: 100vh;
  .top {
    width: 100%;
    box-shadow: 0rpx 0rpx 10rpx 3rpx rgba(196, 196, 196, 0.23);
  }
  .main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 60rpx;
    margin-top: 74rpx;
    image {
      width: 102rpx;
      height: 102rpx;
      margin-bottom: 28rpx;
    }
    text {
      margin-bottom: 28rpx;
    }
  }
}
</style>
